home *** CD-ROM | disk | FTP | other *** search
/ 10,000 Great Games / 10,000 Great Games.iso / Product / 66 / data1.cab / Source_Files / Src / Disaster.cpp < prev    next >
C/C++ Source or Header  |  2000-01-16  |  449b  |  29 lines

  1. #include "stdafx.h"
  2.  
  3. cDisaster *disaster = 0;
  4.  
  5. void cDisaster::make()
  6. {
  7.     new cDisaster();
  8. }
  9.  
  10. cDisaster::cDisaster()
  11.         : cGameObject(cProperties::find_w_error("DISASTER"))
  12. {
  13.     add((cList **)&disaster);
  14.  
  15.     set_sequence(0, TRUE);
  16.     
  17.     set_position(surface->w / 2, 0);
  18. }
  19.  
  20. int cDisaster::control()
  21. {
  22.     cGameObject::control();
  23.     
  24.     if (y2 < surface->start)
  25.         set_position(surface->w / 2, y + (surface->start - y2));
  26.     
  27.     return TRUE;
  28. }
  29.